package com.itheima.exceptions;

import com.itheima.enums.MsgCode;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
 * @Description: 自定义异常
 * @Date :2019-08-17 10:31
 * @Author : yuan_he_song
 */

@Setter
@Getter
@AllArgsConstructor
public class CustomException extends RuntimeException{
    private int code;
    private String msg;

    public CustomException (MsgCode msgCode) {
        this.code = msgCode.getCode();
        this.msg = msgCode.getMsg();
    }


}
